package com.shangxia.basic.common.mybatis.dynamicsource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * @ProjectName: MyDemo_zy
 * @ClassName: DynamicDataSource
 * @Time: 2020-04-01 19:46
 * @Author: zhou24
 * @Description:
 * @Experience:
 */
public class DynamicDataSource extends AbstractRoutingDataSource {
    @Override
    protected Object determineCurrentLookupKey() {
        return DynamicDataSourceContextHolder.getDataSourceType();
    }
}
